<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .warp {
      border: 1px solid red;
      width: 200px;
    }

    .text {
      background: green;
    }

    .f-l {
      float: left;
    }
  </style>
</head>

<body>
  <div class="warp">
    <span class="text">这是文本1</span>
    <span class="text">这是文本2</span>
    <span class="text f-l">这是文本3</span>
    <span class="text">这是文本4</span>
  </div>
</body>

</html>